package com.csx.saas.platform.init.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.csx.basic.base.service.SuperCacheServiceImpl;
import com.csx.basic.cache.model.CacheKeyBuilder;
import com.csx.saas.common.cache.init.InitServiceOrderTimeDiscountCacheKeyBuilder;
import com.csx.saas.platform.init.dao.InitServiceOrderTimeDiscountMapper;
import com.csx.saas.platform.init.entity.InitServiceOrderTimeDiscount;
import com.csx.saas.platform.init.service.InitServiceOrderTimeDiscountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.framework.AopContext;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 业务实现类
 * 服务购买时长折扣
 * </p>
 *
 * @author ChenSongXin
 * @date 2021-02-28
 */
@Slf4j
@Service
@DS("#thread.tenant")
public class InitServiceOrderTimeDiscountServiceImpl extends SuperCacheServiceImpl<InitServiceOrderTimeDiscountMapper, InitServiceOrderTimeDiscount> implements InitServiceOrderTimeDiscountService {

    @Override
    protected CacheKeyBuilder cacheKeyBuilder() {
        return new InitServiceOrderTimeDiscountCacheKeyBuilder();
    }

    protected InitServiceOrderTimeDiscountService currentProxy() {
        return ((InitServiceOrderTimeDiscountService) AopContext.currentProxy());
    }
}
